[pull] main from microsoft:main - #1623
Merged
Merged
Conversation
be more specific
#332174) * sessions: hide external Recent sessions superseded by newer local ones In `Recent` mode the two most recently updated external sessions from the last 7 days are shown. An external session the user has clearly moved on from stayed pinned there regardless of how much local work followed it. Hide an external session once RECENT_EXTERNAL_SUPERSEDING_LOCAL_LIMIT (2) locally created sessions started after its last update, by comparing its modifiedTime against the start time of the 2nd-newest local session. The cutoff is snapshotted rather than derived per listing: sending a first message materializes a local session, so a live cutoff would rotate an external row out of the list mid-use. It is taken on the first Recent listing and refreshed only on an external-sessions mode change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Derive the Recent superseding cutoff from the registry, not hydrated metadata The snapshot was taken from the hydrated `combined` list, which omits sessions whose provider is unavailable or whose metadata read failed, so it could permanently undercount local sessions and leave superseded external rows visible until the mode changed. Derive it from non-external registry entries instead, and commit the snapshot only while the registry epoch still holds so a discarded pass cannot freeze a wrong value. Idle provisional sessions are excluded: they are the composer's placeholder, not sessions the user started. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Restore persisted platform root config on agent host startup `persistRootConfig` writes the whole root value bag to `agent-host-config.json`, but `_loadPersistedRootConfig` only restored the customization, sandbox, copilotCli, agentMerge and proxy schema groups. Every `platformRootSchema` key was dropped on load, and the state manager seeds only `permissions` and `telemetryLevel`, so those keys were genuinely absent from root config until a window connected and re-pushed them. The host reads several of them before that happens. `showExternalSessions` fed the first session catalog pass through `?? AgentHostExternalSessionsMode.None`, so a user configured for `last30Days` saw the workbench UI report 30 days while the host logged `none` and hid external sessions until the mirror landed. The same gap affected `codexAgentEnabled` (read during provider registration), `migrateLegacyCopilotCliEnabled` and `editTelemetryEnabled`, and meant hand-edited values in a remote `agent-host-config.json` were ignored. Restore the platform-owned keys alongside the other schema groups. Root `permissions` stays excluded: it mirrors the connected client's managed settings, so reviving a previous run's value could re-grant an allow rule that has since been revoked. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Do not restore client-owned approval settings on host startup Restoring all of `platformRootSchema` was too broad. The schema also holds approval and policy values that the connected client pushes on every connect: `globalAutoApproveEnabled`, `autoApprovePolicyRestricted`, the terminal auto-approve enabled flag and rule set, `editAutoApprovePatterns` and `autoReplyEnabled`. All are persisted from client `RootConfigChanged` actions, and all gate permission prompts. Reviving them on startup carries the same stale re-grant risk already called out for `permissions`: if a user, workspace, or policy tightens one while the host is stopped, the old permissive value comes back and applies to any session that runs before a client reconnects. `terminalAutoApproveEnabled` is worse than a plain staleness bug, since it is deliberately resolved workspace-aware on the client and a persisted global value ignores a workspace that turned approval off. Group these under `clientOwnedApprovalRootConfigKeys` next to the schema that defines them, and skip them when loading. `_forwardClientConfig` re-pushes every one on connect and reconnect, so nothing is lost by waiting; falling back to the restrictive schema default is the fail-safe direction. Operator-owned values such as `mcpServers`, which no client pushes, still restore so a hand-edited remote `agent-host-config.json` keeps working. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* reasoning ux: fix fixed scrolling headers * Fix streamed fixed-scrolling title Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6698ab91-2513-4857-a5cc-bd080bf813b6 --------- Copilot-Session: 6698ab91-2513-4857-a5cc-bd080bf813b6
* chat: confirm before stopping active agent sessions Show Update in the Agents window during active sessions and guard quit, last-window close, and update restart while local Agent Host work is starting or running. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: track in-flight first requests Keep management-owned first-request state across foreground, background, headless, and quick-chat sends so shutdown protection does not depend on draft visibility or provider catalog publication. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: make update visibility platform neutral Test the shared additional-placement context expression directly so browser suites do not instantiate the Electron-only update contribution. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: retain concurrent in-flight requests Reference-count first requests by session resource so one concurrent send cannot clear shutdown protection while another is still starting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* pet: advancement hint, pill detection, better continuity * address comments --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )